<?php 
namespace app\admin\model;
use think\Model;

	class Access extends Model{
		/**
		 * 获取所有的权限
		 * @return $re
		*/
		public function getAllPer($id){
			$data = $this
				->join('system_module','mod_id=right_id')
				->where("role_id=".$id." and visible=1")
				->field('right_id')
				->select();
			$re=[];
			foreach($data as $v){
				$re[]=$v['right_id'];
			}
			return $re;
		}
	}